<template>
	<view>
		<uni-combox label="所在城市" :candidates="candidates" placeholder="请选择所在城市" v-model="city"></uni-combox>
			<uni-section :title="'日期时间范围用法：' + '[' + datetimerange + ']' " type="line"></uni-section>
			<view class="example-body">
				<uni-datetime-picker v-model="datetimerange" type="datetimerange" start="2021-3-20 12:00:00"
					end="2021-6-20 20:00:00" rangeSeparator="至" />
			</view>
	</view>
</template>

<script>
	export default {
		name: 'me',
		data() {
			return {
				datetimerange: ["2021-03-20 20:10:10", "2021-05-10 10:10:10"],
				currentIndex: "1"
			}
		},
		watch: {
			datetimerange(newval) {
				console.log("范围选:", this.datetimerange);
			},
		},
		methods: {
			getIndex(index) {
				this.currentIndex = index;
			}
		}
	}
</script>

<style>
	.me {
		display: flex;
	}
</style>
